import Vue from 'vue'
import Router from 'vue-router'
import Film from '@/components/tabar/Film'
import Cinema from '@/components/tabar/Cinema'
import Me from '@/components/tabar/Me'
import Coming from '@/components/coming/Coming'
import FilmDetail from '@/components/filmdetail/FilmDetail'
import Detail from '@/components/filmdetail/Detail'
import SelectTime from '@/components/cinema/SelectTime'
import MeiTuan from '@/components/me/MeiTuan'
import Phone from '@/components/me/Phone'
import Order from '@/components/me/Order'
import Seat from '@/components/commom/Seat'
import Search from '@/components/search/Search'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {path: '/', redirect: '/film'},
    {path: '/film', component: Film},
    {path: '/cinema', component: Cinema},
    {path: '/me', component: Me},
    {path: '/film/coming', component: Coming},
    {path: '/film/filmdetail/:id', component: FilmDetail},
    {path: '/film/detail/:id', component: Detail},
    {path: '/film/cinema/:fid/:cid', component: SelectTime},
    {path: '/cinema/:cid', component: SelectTime},
    {path: '/me/meituan', component: MeiTuan},
    {path: '/me/phone', component: Phone},
    {path: '/me/order/:id', component: Order, name: 'order'},
    {path: '/seatSelect', component: Seat, name: 'seat'},
    {path: '/search', component: Search}
  ],
  linkActiveClass: 'mui-active'
})
